﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using E_Commerce.Application.Dto;
using E_Commerce.Domain.Entities;//引用

namespace E_Commerce.Application
{
   public interface IProductService
    {
       
        /// <summary>
        /// 显示+分页+查询
        /// </summary>
        /// <param name="pageIndex">页大小</param>
        /// <param name="pageSize">页索引</param>
        /// <param name="totalCount">总条数</param>
        /// <param name="pName">商品名称</param>
        /// <returns></returns>
        List<ProductDto> GetProductsAsync(int pageIndex, int pageSize, out int totalCount, string pName = "");
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<int> DeleAsync(int id);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>

        Task<int> InsertAsync(ProductDto p);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>

        Task<int> UptAsync(ProductDto p);
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<Product> FillAsync(int id);
        /// <summary>
        /// 加入回收站
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<int> UptStatusAsync(int id);
        /// <summary>
        /// 还原
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<int> DownStatusAsync(int id);
        /// <summary>
        /// 显示回收站
        /// </summary>
        /// <param></param>
        /// <returns></returns>
        List<Product> AgainAsync();

        /// <summary>
        /// 商品详情
        /// </summary>
        /// <param name="id">商品表主键</param>
        /// <returns></returns>
        ProductDto ProductdetailsAsync(int id);
        /// <summary>
        /// 商品分类
        /// </summary>
        /// <param name="id">分类表ID</param>
        /// <returns></returns>
       ProductCategoryDto CommodityAsync(int id);

    }
}
